(function($){
  /**
   * Make the search box on the top menu navigation go to the friendly url search page.
   */
  Drupal.behaviors.searchBox = {
    attach : function() {
      jQuery('.searchbox-form').submit(function(e){
        console.log('submitting');
        e.preventDefault();
        window.location = Drupal.settings.basePath + "search/node/" + $(this).find('input[name="search"]').val();
      });
    }
  };
}(jQuery));